<extend name="Layout/application"/>
<block name="content">
<!-- 焦点图 -->
<section class="section m_featuredArea">
    <div class="classList carousel grid_1 large featureGuest ">
        <div class="listItem image">
            <div class="l-header white center cover">
                <div class="headerInner">
                    <h1>遇见明天的<br>工作生活</h1>
                    <h2>有趣的IT学习<br>在线视频课程</h2>
                    <div class="mt10 l-grid grid_2">
                        <div class="block">
                            <a href="/users/sign_up" class=" button blue  flex">账号注册 (免费)</a>
                        </div>
                        <div class="block">
                            <a href="#" id="btn_login_modal" class=" button white  flex btn_login_modal">登录</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <volist name="adverts" id="advert">
            <div class="listItem image is-selected">
                <a href="/courses/10" title="PHP入门-免费公开中 - 人气Web语言！">
                    <div class="image">
                        <img alt="PHP入门-免费公开中 - 人气Web语言！"
                             src="{{$advert.photos.image}}-thumb">
                    </div>
                    <div class="info">
                        <div class="description">
                            <div class="classDetail">
                                <p class="subInfo">
                                </p>
                                <h3 class="title">
                                    {{$advert.name}}-免费公开中<br>
                                    {{$advert.desc}}
                                </h3>
                            </div>
                        </div>
                    </div>
                </a>
            </div>
        </volist>

    </div>
</section>

<section class="m_todayClasses">
    <h3 class="heading">课程发布日历
        <p>
            <a href="/calendar">查阅日历</a>
        </p>
    </h3>
    <div class="classList carousel grid_3 featureGuestOther ">

        <volist name="course_times" id="course_time">
            <div class="listItem carousel-cell status_2 is-selected">

                <div class="reservation mark">
                    <div class="reservationBox noForm">
                        <div class="m_button">
                            <button class="reservationButton able" data-type="Course" data-id="24">
                                <div class="m_count"><span>{{$course_time.likes_count}}</span></div>
                            </button>
                        </div>
                    </div>
                </div>

                <a href="courses/{{$course_time.id}}">
                    <div class="image">
                        <img class="border" alt="小白玩转macOS"
                             src="{{$course_time.photo.image}}-thumb">
                        <span></span>
                    </div>
                    <div class="info">
                        <div class="badges">
                            <if $course_time.complete ==0>

                                <span class="badge live">更新中</span>
                            </if>
                        </div>
                        <p class="date"><span>
                        {{$course_time.created_at|date="m月d日"}} </span></p>
                        <h4 class="title">{{$course_time.name}}</h4>
                    </div>
                </a>
            </div>
        </volist>
    </div>
</section>


<section class="m_liveClasses">
    <h3 class="heading">最受欢迎的课程
        <p>
            <a href="/categories/all?sort=featured">更多</a>
        </p>
    </h3>

    <div class="classList carousel grid_3 featureGuestOther">

        <volist name="course_bests" id="course_best">
            <div class="listItem carousel-cell status_2 is-selected">
                <div class="reservation mark">
                    <div class="reservationBox noForm">
                        <div class="m_button">
                            <button class="reservationButton able" data-type="Course" data-id="26">
                                <div class="m_count"><span>{{$course_best.likes_count}}</span></div>
                            </button>
                        </div>
                    </div>
                </div>

                <a href="/courses/26">
                    <div class="image">
                        <img class="border" alt="超简单的Laravel新手入门教程"
                             src="{{$course_best.photo.image}}-thumb">
                        <span></span>
                    </div>
                    <div class="info">

                        <div class="badges">
                            <span class="badge blue live ranking">1</span>
                        </div>

                        <h4 class="title">{{$course_best.name}}</h4>

                        <div class="summary">
                            <div class="spec">
                                <p></p>
                            </div>
                        </div>
                    </div>
                </a>
            </div>
        </volist>

    </div>
</section>

<!--最近学习的课程-->

<!--入门课程-->
<section class="recommend">
    <h3 class="heading">入门课程</h3>
    <div class="courseList carousel horizontal grid_3 featureGuestOther">

        <volist name="course_ins" id="course_in">
            <div class="listItem carousel-cell is-selected">
                <a href="/courses/10" title="PHP入门（全4回）">
                    <div class="image badge-traiangle">
                        <img class="border" alt="PHP入门（全4回）"
                             src="{{$course_in.photos.image}}-thumb">
                    </div>
                    <div class="info">
                        <div class="m_badge">
                        </div>
                        <h4 class="title">{{$course_in.name}}</h4>
                        <div class="detail">
                            <span>{{$course_in.create_time|date=" Y-m-d"}}发布</span>
                        </div>
                    </div>
                </a>
            </div>
        </volist>
    </div>

</section>


<section class="catList">
    <h3 class="heading"><i class="icon-search"></i> 课程分类</h3>
    <ul class="menuList thin harf">
        <volist name="categories" id="category">
        <li><a href="/categories/front_end">{{$category.name}}</a></li>
        </volist>
    </ul>
</section>

<section class="newsModule">
    <h3 class="heading"><i class="icon-bullhorn"></i>公告</h3>
<volist name="notice_news" id="notice_new">
    <dl class="datelist">
        <dt>{{$notice_new.create_time|date="Y年m月d日"}}</dt>
        <dd>
            <a href="/news/7">
                {{$notice_new.title}}
            </a>
        </dd>

    </dl>
</volist>
</section>

<div class="foot_chara row">
    <div class="btnArea mt10">
        <p class="regist"><a href="#" id="btn_signup_modal" class=" button blue x-large flex btn_login_modal">会员登录
            <i class="icon-chevron-right"></i></a></p>
    </div>
</div>


<div class="pagetop unsigned" style="display:none;">
    <p><a><span><i class="fa fa-angle-up"></i></span></a></p>
</div>
</block>
